
<% if (session[:name]!=nil) %>
    <h1> Hi, <%= session[:name] %> </h1>
    <p>Successful log on:) </p>
<% else %>
    <p>Please <%= link_to "log in", :controller => "login" %>:)</p>
<% end %>